Refactoring to Aspects – an Experiment

نویسنده

  • Yunjing Zhang
چکیده

Aspect-oriented (AO) programming proposes a solution to the crosscutting problem in Object-oriented (OO) programming by supporting the modularization of crosscutting concerns with new composition mechanisms. This paper evaluates the solution through aspect mining two existing Java code-bases and then refactoring crosscutting concerns found in them into aspects using AspectJ. It documents the process, reports a suspected bug found in AJDT, compares the modularity of resulting code to that of the original, and discusses on causes behind the difficulties encountered during the process. The main observation obtained from the refactoring is that due to variations in implementation of a crosscutting concern, making general pointcuts and writing advices’ inner structures to cover an entire concern is nontrivial. It concludes that AOP does have the potential to improve system’s modularity, but with current technology of AOP and available supporting tools, AO refactoring is hard and the refactored AO system most unlikely preserves the behavior of the original OO system in most cases.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

An Empirical Evaluation of Refactoring

This paper presents a process evaluation for the agile technique of refactoring based on the language C. The basis for this evaluation is made up by an experiment which is targeted on the aspects of increased maintainability and modifiability. Although the maintainability test shows a slight advantage for refactoring, results show no significant strength here. Concerning modifiability, the over...

متن کامل

A test driven approach for aspectualizing legacy software using mock systems

Aspect-based refactoring, called aspectualization, involves moving program code that implements cross-cutting concerns into aspects. Such refactoring can improve the maintainability of legacy systems. Long compilation and weave times, and the lack of an appropriate testing methodology are two challenges to the aspectualization of large legacy systems. We propose an iterative test driven approac...

متن کامل

On the Notion of Functional Aspects in Aspect-Oriented Refactoring

In this paper, we examine the notion of functional aspects in context of aspect-oriented refactoring. Treating aspects as functions reduces the potential interactions between aspects significantly. We propose a simple mathematical model that incorporates fundamental properties of aspects and their interactions. Using this model, we show that with regard to refactoring functional aspects are as ...

متن کامل

Refactoring JHOTDRAW’s Undo concern to ASPECTJ

In this paper we discuss an approach to the aspect-oriented refactoring of the Undo concern in an open-source Java system. A number of challenges and considerations of the proposed solution are analyzed for providing useful feedback about how the employed aspect language could better support the refactoring to aspects. We also consider the unpluggability property of a concern as an estimate of ...

متن کامل

An illustrative example of refactoring object-oriented source code with aspect-oriented mechanisms

This paper describes a refactoring process that transforms a Java source code base into a functionally equivalent AspectJ source code base. The process illustrates the use of a collection of refactorings for aspect-oriented source code, covering the extraction of scattered implementation elements to aspects, the internal reorganization of the extracted aspects and the extraction of commonalitie...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2007